function table.Copy(tbl)
	local newtable = {}
	for k,v in pairs(tbl) do
		local value = nil
		
		if type(v) == "table" then
			value = table.Copy(v)
		else
			value = v
		end
		newtable[k] = value
	end
	return newtable
end

function table.Merge(a, ...)
	for _,t in pairs(arg) do
		if type(t) == "table" then
			for k,v in pairs(t) do
				a[k] = v
			end
		end
	end
	return a
end

function table.removeValue(t, value)
	for k,v in pairs(t) do
		if v == value then
			table.remove(t, k)
		end
	end
end

function PrintTable(table, recursive, indent)
	if type(table) ~= "table" then return end
	indent = indent or 0
	if recursive == nil then recursive = true end
	local indentstring = ""
	for i=1,indent do indentstring=indentstring.."   " end
	
	for k,v in pairs(table) do
		if type(v) == "table" then
			if recursive then
				print(indentstring..tostring(k).." = {")
				PrintTable(v, recursive, indent+1)
				print(indentstring.."}")
			else
				print(indentstring..tostring(k).." = {}")
			end
			
		else
			print(indentstring..tostring(k).." = "..tostring(v))
		end
	end
end